package com.hans.myscanner.Scanner.Activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.annotation.PluralsRes;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

import com.haha.extend.HeadBar.BaseHeaderView;
import com.haha.extend.HeadBar.ImageInLeftAndRight;
import com.hans.Utils.ContactUtils;
import com.hans.myscanner.R;
import com.hans.myscanner.entity.ContactEntity;

/**
 * Created by Administrator on 2016/7/9.
 */
public class DecodedContactActivity extends AppCompatActivity {
    //解码
    private ImageInLeftAndRight header;
    private TextView contactName,contactPhones,contactEmails;
    private View newContactBtn,addIntoContactBtn;
    private ContactEntity ce;
    private ContactUtils cu;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_decoded_contact);
        findView();
        initView();
    }

    private void findView() {
        header= (ImageInLeftAndRight) findViewById(R.id.header);
        contactName= (TextView) findViewById(R.id.contact_name);
        contactPhones= (TextView) findViewById(R.id.contact_phone_tv);
        contactEmails= (TextView) findViewById(R.id.contact_emails_tv);
        newContactBtn=findViewById(R.id.new_contact_btn);
        addIntoContactBtn=findViewById(R.id.add_into_contact);

    }
    private void initView() {
        header.setOnHeaderClickListener(onHeaderClickListener);
        newContactBtn.setOnClickListener(onClickListener);
        addIntoContactBtn.setOnClickListener(onClickListener);
    }

    private View.OnClickListener onClickListener=new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            switch (v.getId()){
                case R.id.new_contact_btn:

                    break;
                case R.id.add_into_contact:

                    break;
            }
        }
    };

   private  BaseHeaderView.OnHeaderClickListener onHeaderClickListener=new BaseHeaderView.OnHeaderClickListener() {
       @Override
       public void onHeaderLeftClicked() {
           finish();
       }

       @Override
       public void onHeaderCenterClicked() {

       }

       @Override
       public void onHeaderRightClicked() {

       }
   };
}
